﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace hse_2013_local_game2d
{
    public abstract class Bomb
    {
        public delegate void BombExploaded (Bomb B);
        public static event BombExploaded Explosion;
        protected Point bPosition;
        protected int explosionFrameCounter;
        public int ExplosionFrameCounter
        {
            get { return explosionFrameCounter; }
        }
        protected bool burnMode;

        public bool BurnMode
        {
            get { return burnMode; }
            set { burnMode = value; }
        }
        public Point Position
        {
            get { return bPosition; }
        }
        private Image explosionView;

        public Image ExplosionView
        {
            get { return explosionView; }
            set { explosionView = value; }
        }
        public Bomb(Point position,Image explosionView)
        {
            this.bPosition = position;
            this.explosionView = explosionView;
            this.explosionFrameCounter = 0;
            this.burnMode = false;

        }
        public abstract void Move();
        public abstract void OnPaint(Graphics g);
        public void ExplosionOccured(Bomb b)
        {
            Explosion(b);
        }
    }
}
